'''
Created on May 31, 2010

@author: Andrzej
'''
import sys
sys.path.append('E:\Home\CODE\MySVN\PYTHON\djHome\src\djHome')

from Daq328p import Daq328p
from  djHome.djDaq.models import  *
import time


if __name__ == '__main__':
    
    if False:
        Sensor = [] 
        Sensor.append(Daq328p('192.168.1.100',2000))
        Sensor.append(Daq328p('COM',7))
        
        for S in Sensor:
            S.debug = 0
        
        for i in range(1000):
            t = time.gmtime()
            print i, "%d.%d.%d %d:%d:%d" % t[0:6]
            for S in Sensor:
                di   = S.GetDI()
                ad   = S.GetADC(volt = 0)
                temp = S.GetTemperature()
                print temp
                
        for S in Sensor:
            S.close()